﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<%
    BIZ.WebInfomationPublishOper ipo = new BIZ.WebInfomationPublishOper();
    string pid = Request.QueryString["pid"] == null ? ((int)DAL.webEnums.template.嘉沃课程_英语课程).ToString() : Request.QueryString["pid"].ToString();
    string id = Request.QueryString["id"] == null ? "0": Request.QueryString["id"].ToString();
    int pageno = Request["pageno"] == null ? 1 : int.Parse(Request["pageno"].ToString());//当前页
    int pagesize = 15;//单页记录数
    IList yykc = ipo.getlistweb(pageno, pagesize, (int)DAL.webEnums.template.嘉沃课程_英语课程);
    IList tsxq = ipo.getlistweb(pageno, pagesize, (int)DAL.webEnums.template.嘉沃课程_特色兴趣课);
    Hashtable t = null;   
     %>
<div class="main w_980 clearfix">
	<!--left-->
    <div class="left_box">
    	<!--menu-->
        <div class="menu">
        	<h2><img src="../../images/ico_11.png" /><strong><span>嘉沃课程</span></strong></h2>
            <ul>
            <%
                int i = 0;
                Response.Write("<li>");
                Response.Write("<a href='javascript:void(0);' >英语课程</a>");
                if (yykc.Count > 0)
                {
                    Response.Write("<p class='block'>");                    
                    foreach (Hashtable tb in yykc)
                    {
                        if (tb["total"] == null)
                        {
                            if (i == 0 && id == "0" && pid == ((int)DAL.webEnums.template.嘉沃课程_英语课程).ToString())
                            {
                                id = tb["Wi_id"].ToString();
                                i++;
                            }
                            Response.Write("<a href=\"/template/jwkc.html?pid=" + pid + "&id=" + tb["Wi_id"] + "\">·&nbsp;" + (tb["Wi_title0"] == null ? "" : tb["Wi_title0"].ToString()) + "</a>");
                        }
                    }
                    Response.Write("</p>");
                }
                Response.Write("</li>");

                Response.Write("<li>");
                Response.Write("<a href='javascript:void(0);'>特色兴趣课</a>");
                if (tsxq.Count > 0)
                {
                    Response.Write("<p class='block'>");
                    foreach (Hashtable tb in tsxq)
                    {
                        if (tb["total"] == null)
                        {
                            if (i == 0 && id == "0" && pid == ((int)DAL.webEnums.template.嘉沃课程_特色兴趣课).ToString())
                            {
                                id = tb["Wi_id"].ToString();
                                i++;
                            } 
                            Response.Write("<a href=\"/template/jwkc.html?pid=" + pid + "&id=" + tb["Wi_id"] + "\">·&nbsp;" + (tb["Wi_title0"] == null ? "" : tb["Wi_title0"].ToString()) + "</a>");
                        }
                    }
                    Response.Write("</p>");
                }
                Response.Write("</li>");                
                 %>
            </ul>
        <script type="text/javascript">
            $(function () {
                $(".menu ul li").children("a").click(function () {
                    $(this).parent("li").children("p").toggleClass("c");
                    $(this).children("b").toggleClass("s");
                })
            });
        </script>
        </div>
        <!--联系方式-->
        <% 
            Html.RenderPartial("~/Views/Shared/lxfs.ascx"); 
        %>
    </div>
	<!--right-->
    <div class="right_box">
     <%
            IList detail = ipo.getinfomationbyid(int.Parse(id));
            if (detail.Count > 0)
                t = (Hashtable)detail[0];
             %>
    	<!--title-->
    	<div class="title_box"><strong><%=(t["Wi_title0"] == null ? "" : t["Wi_title0"].ToString())%></strong><span>·<a href="/index.html">首页</a>&gt;<a href="jwkc.html">嘉沃课程</a>&gt;<a href="jwkc.html?pid=<%=pid %>"><%=Enum.GetName(typeof(DAL.webEnums.template), int.Parse(pid)).Replace("嘉沃课程_", "")%></a>&gt;<a href="jwkc.html?id=<%=id %>"><%=(t["Wi_title0"] == null ? "" : t["Wi_title0"].ToString())%></a></span></div>
        <!--box-->
        <div class="info_box_main">
            <h4><%=(t["Wi_title1"] == null ? "" : t["Wi_title1"].ToString())%></h4>
            <div class="info_box_time"><%=DateTime.Parse(t["Wi_addTime"].ToString()).ToString("yyyy年MM月dd日HH:mm")%><span>嘉沃教育</span></div>
            <div class="info_box_main_txt">
            	<%=(t["Wi_content"] == null ? "" : BIZ.StringTool.GetImgs(t["Wi_content"].ToString()))%>
            </div>
        </div>
    </div>
</div>

</asp:Content>
